﻿//--------------------------------------------------------------------------
// 
//  Copyright (c) Chili Software.  All rights reserved. 
// 
//  File: DynamicPropertiesException.cs
//
//  Description: Thrown if the dynamic properties can't be stored or parsed.
// 
//--------------------------------------------------------------------------

using System;

namespace Chili.Opf3.DynamicProperties
{
	/// <summary>
	/// Exception is thrown if something goes wrong while creating the 
	/// <see cref="DynamicProperty">DynamicProperties</see> or converting them to xml.
	/// </summary>
	[Serializable]
	public sealed class DynamicPropertyException : Exception
	{
		/// <summary>
		/// Creates a new instance of the
		/// <see cref="DynamicPropertyException">DynamicPropertyException Class</see>.
		/// </summary>
		private DynamicPropertyException(System.Runtime.Serialization.SerializationInfo info,
		  System.Runtime.Serialization.StreamingContext context) : base(info, context)
		{
		}

		/// <summary>
		/// Creates a new instance of the <see cref="DynamicPropertyException">DynamicPropertyException Class</see>.
		/// </summary>
		public DynamicPropertyException() 
		{ 
		}

		/// <summary>
		/// Creates a new instance of the <see cref="DynamicPropertyException">DynamicPropertyException Class</see>.
		/// </summary>
		/// <param name="message">A message that describes the current exception.</param>
		public DynamicPropertyException(string message) : base(message)
		{ 
		}

		/// <summary>
		/// Creates a new instance of the <see cref="DynamicPropertyException">DynamicPropertyException Class</see>.
		/// </summary>
		/// <param name="message">A message that describes the current exception.</param>
		/// <param name="inner">The exception that caused the current exception.</param>
		public DynamicPropertyException(string message, Exception inner) : base(message, inner)
		{ 
		}
	}
}
